<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/boost/algorithm/string/find_iterator.hpp</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../../index.html">top level</a> - <a href="index.html">usr/include/boost/algorithm/string</a> - find_iterator.hpp<span style="font-size: 80%;"> (source / <a href="find_iterator.hpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">17</td>
            <td class="headerCovTableEntry">19</td>
            <td class="headerCovTableEntryMed">89.5 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:25:26</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">3</td>
            <td class="headerCovTableEntry">6</td>
            <td class="headerCovTableEntryLo">50.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : //  Boost string_algo library find_iterator.hpp header file  ---------------------------//</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : //  Copyright Pavol Droba 2002-2004.
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       6 </span>            : //    (See accompanying file LICENSE_1_0.txt or copy at
<span class="lineNum">       7 </span>            : //          http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       8 </span>            : 
<span class="lineNum">       9 </span>            : //  See http://www.boost.org/ for updates, documentation, and revision history.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : #ifndef BOOST_STRING_FIND_ITERATOR_HPP
<span class="lineNum">      12 </span>            : #define BOOST_STRING_FIND_ITERATOR_HPP
<span class="lineNum">      13 </span>            : 
<span class="lineNum">      14 </span>            : #include &lt;boost/algorithm/string/config.hpp&gt;
<span class="lineNum">      15 </span>            : #include &lt;boost/iterator/iterator_facade.hpp&gt;
<span class="lineNum">      16 </span>            : #include &lt;boost/iterator/iterator_categories.hpp&gt;
<span class="lineNum">      17 </span>            : 
<span class="lineNum">      18 </span>            : #include &lt;boost/range/iterator_range_core.hpp&gt;
<span class="lineNum">      19 </span>            : #include &lt;boost/range/begin.hpp&gt;
<span class="lineNum">      20 </span>            : #include &lt;boost/range/end.hpp&gt;
<span class="lineNum">      21 </span>            : #include &lt;boost/range/iterator.hpp&gt;
<span class="lineNum">      22 </span>            : #include &lt;boost/range/as_literal.hpp&gt;
<span class="lineNum">      23 </span>            : 
<span class="lineNum">      24 </span>            : #include &lt;boost/algorithm/string/detail/find_iterator.hpp&gt;
<span class="lineNum">      25 </span>            : 
<span class="lineNum">      26 </span>            : /*! \file
<span class="lineNum">      27 </span>            :     Defines find iterator classes. Find iterator repeatedly applies a Finder
<span class="lineNum">      28 </span>            :     to the specified input string to search for matches. Dereferencing
<span class="lineNum">      29 </span>            :     the iterator yields the current match or a range between the last and the current
<span class="lineNum">      30 </span>            :     match depending on the iterator used.
<span class="lineNum">      31 </span>            : */
<span class="lineNum">      32 </span>            : 
<span class="lineNum">      33 </span>            : namespace boost {
<span class="lineNum">      34 </span>            :     namespace algorithm { 
<span class="lineNum">      35 </span>            : 
<span class="lineNum">      36 </span>            : //  find_iterator -----------------------------------------------//
<span class="lineNum">      37 </span>            : 
<span class="lineNum">      38 </span>            :         //! find_iterator
<span class="lineNum">      39 </span>            :         /*!    
<span class="lineNum">      40 </span>            :             Find iterator encapsulates a Finder and allows
<span class="lineNum">      41 </span>            :             for incremental searching in a string.
<span class="lineNum">      42 </span>            :             Each increment moves the iterator to the next match.
<span class="lineNum">      43 </span>            : 
<span class="lineNum">      44 </span>            :             Find iterator is a readable forward traversal iterator.
<span class="lineNum">      45 </span>            : 
<span class="lineNum">      46 </span>            :             Dereferencing the iterator yields an iterator_range delimiting
<span class="lineNum">      47 </span>            :             the current match.
<span class="lineNum">      48 </span>            :         */
<span class="lineNum">      49 </span>            :         template&lt;typename IteratorT&gt;
<span class="lineNum">      50 </span>            :         class find_iterator : 
<span class="lineNum">      51 </span>            :             public iterator_facade&lt;
<span class="lineNum">      52 </span>            :                 find_iterator&lt;IteratorT&gt;,
<span class="lineNum">      53 </span>            :                 const iterator_range&lt;IteratorT&gt;,
<span class="lineNum">      54 </span>            :                 forward_traversal_tag &gt;,
<span class="lineNum">      55 </span>            :             private detail::find_iterator_base&lt;IteratorT&gt;
<span class="lineNum">      56 </span>            :         {
<span class="lineNum">      57 </span>            :         private:
<span class="lineNum">      58 </span>            :             // facade support
<span class="lineNum">      59 </span>            :             friend class ::boost::iterator_core_access;
<span class="lineNum">      60 </span>            : 
<span class="lineNum">      61 </span>            :         private:
<span class="lineNum">      62 </span>            :         // typedefs
<span class="lineNum">      63 </span>            : 
<span class="lineNum">      64 </span>            :             typedef detail::find_iterator_base&lt;IteratorT&gt; base_type;
<span class="lineNum">      65 </span>            :             typedef BOOST_STRING_TYPENAME 
<span class="lineNum">      66 </span>            :                 base_type::input_iterator_type input_iterator_type;
<span class="lineNum">      67 </span>            :             typedef BOOST_STRING_TYPENAME 
<span class="lineNum">      68 </span>            :                 base_type::match_type match_type;
<span class="lineNum">      69 </span>            : 
<span class="lineNum">      70 </span>            :         public:
<span class="lineNum">      71 </span>            :             //! Default constructor
<span class="lineNum">      72 </span>            :             /*!
<span class="lineNum">      73 </span>            :                 Construct null iterator. All null iterators are equal.
<span class="lineNum">      74 </span>            : 
<span class="lineNum">      75 </span>            :                 \post eof()==true
<span class="lineNum">      76 </span>            :             */
<span class="lineNum">      77 </span>            :             find_iterator() {}
<span class="lineNum">      78 </span>            : 
<span class="lineNum">      79 </span>            :             //! Copy constructor
<span class="lineNum">      80 </span>            :             /*!
<span class="lineNum">      81 </span>            :                 Construct a copy of the find_iterator
<span class="lineNum">      82 </span>            :             */
<span class="lineNum">      83 </span>            :             find_iterator( const find_iterator&amp; Other ) :
<span class="lineNum">      84 </span>            :                 base_type(Other),
<span class="lineNum">      85 </span>            :                 m_Match(Other.m_Match),
<span class="lineNum">      86 </span>            :                 m_End(Other.m_End) {}
<span class="lineNum">      87 </span>            : 
<span class="lineNum">      88 </span>            :             //! Constructor
<span class="lineNum">      89 </span>            :             /*!
<span class="lineNum">      90 </span>            :                 Construct new find_iterator for a given finder
<span class="lineNum">      91 </span>            :                 and a range.
<span class="lineNum">      92 </span>            :             */
<span class="lineNum">      93 </span>            :             template&lt;typename FinderT&gt;
<span class="lineNum">      94 </span>            :             find_iterator(
<span class="lineNum">      95 </span>            :                     IteratorT Begin,
<span class="lineNum">      96 </span>            :                     IteratorT End,
<span class="lineNum">      97 </span>            :                     FinderT Finder ) :
<span class="lineNum">      98 </span>            :                 detail::find_iterator_base&lt;IteratorT&gt;(Finder,0),
<span class="lineNum">      99 </span>            :                 m_Match(Begin,Begin),
<span class="lineNum">     100 </span>            :                 m_End(End)
<span class="lineNum">     101 </span>            :             {
<span class="lineNum">     102 </span>            :                 increment();
<span class="lineNum">     103 </span>            :             }
<span class="lineNum">     104 </span>            : 
<span class="lineNum">     105 </span>            :             //! Constructor
<span class="lineNum">     106 </span>            :             /*!
<span class="lineNum">     107 </span>            :                 Construct new find_iterator for a given finder
<span class="lineNum">     108 </span>            :                 and a range.
<span class="lineNum">     109 </span>            :             */
<span class="lineNum">     110 </span>            :             template&lt;typename FinderT, typename RangeT&gt;
<span class="lineNum">     111 </span>            :             find_iterator(
<span class="lineNum">     112 </span>            :                     RangeT&amp; Col,
<span class="lineNum">     113 </span>            :                     FinderT Finder ) :
<span class="lineNum">     114 </span>            :                 detail::find_iterator_base&lt;IteratorT&gt;(Finder,0)
<span class="lineNum">     115 </span>            :             {
<span class="lineNum">     116 </span>            :                 iterator_range&lt;BOOST_STRING_TYPENAME range_iterator&lt;RangeT&gt;::type&gt; lit_col(::boost::as_literal(Col));
<span class="lineNum">     117 </span>            :                 m_Match=::boost::make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col));
<span class="lineNum">     118 </span>            :                 m_End=::boost::end(lit_col);
<span class="lineNum">     119 </span>            : 
<span class="lineNum">     120 </span>            :                 increment();
<span class="lineNum">     121 </span>            :             }
<span class="lineNum">     122 </span>            : 
<span class="lineNum">     123 </span>            :         private:
<span class="lineNum">     124 </span>            :         // iterator operations
<span class="lineNum">     125 </span>            : 
<span class="lineNum">     126 </span>            :             // dereference
<span class="lineNum">     127 </span>            :             const match_type&amp; dereference() const
<span class="lineNum">     128 </span>            :             {
<span class="lineNum">     129 </span>            :                 return m_Match;
<span class="lineNum">     130 </span>            :             }
<span class="lineNum">     131 </span>            : 
<span class="lineNum">     132 </span>            :             // increment
<span class="lineNum">     133 </span>            :             void increment()
<span class="lineNum">     134 </span>            :             {
<span class="lineNum">     135 </span>            :                 m_Match=this-&gt;do_find(m_Match.end(),m_End);
<span class="lineNum">     136 </span>            :             }
<span class="lineNum">     137 </span>            : 
<span class="lineNum">     138 </span>            :             // comparison
<span class="lineNum">     139 </span>            :             bool equal( const find_iterator&amp; Other ) const
<span class="lineNum">     140 </span>            :             {
<span class="lineNum">     141 </span>            :                 bool bEof=eof();
<span class="lineNum">     142 </span>            :                 bool bOtherEof=Other.eof();
<span class="lineNum">     143 </span>            : 
<span class="lineNum">     144 </span>            :                 return bEof || bOtherEof ? bEof==bOtherEof :
<span class="lineNum">     145 </span>            :                     (
<span class="lineNum">     146 </span>            :                         m_Match==Other.m_Match &amp;&amp;
<span class="lineNum">     147 </span>            :                         m_End==Other.m_End 
<span class="lineNum">     148 </span>            :                     );
<span class="lineNum">     149 </span>            :             }
<span class="lineNum">     150 </span>            : 
<span class="lineNum">     151 </span>            :         public:
<span class="lineNum">     152 </span>            :         // operations
<span class="lineNum">     153 </span>            : 
<span class="lineNum">     154 </span>            :             //! Eof check
<span class="lineNum">     155 </span>            :             /*!
<span class="lineNum">     156 </span>            :                 Check the eof condition. Eof condition means that
<span class="lineNum">     157 </span>            :                 there is nothing more to be searched i.e. find_iterator
<span class="lineNum">     158 </span>            :                 is after the last match.
<span class="lineNum">     159 </span>            :             */
<span class="lineNum">     160 </span>            :             bool eof() const
<span class="lineNum">     161 </span>            :             {
<span class="lineNum">     162 </span>            :                 return 
<span class="lineNum">     163 </span>            :                     this-&gt;is_null() || 
<span class="lineNum">     164 </span>            :                     ( 
<span class="lineNum">     165 </span>            :                         m_Match.begin() == m_End &amp;&amp;
<span class="lineNum">     166 </span>            :                         m_Match.end() == m_End
<span class="lineNum">     167 </span>            :                     );
<span class="lineNum">     168 </span>            :             }
<span class="lineNum">     169 </span>            : 
<span class="lineNum">     170 </span>            :         private:
<span class="lineNum">     171 </span>            :         // Attributes
<span class="lineNum">     172 </span>            :             match_type m_Match;
<span class="lineNum">     173 </span>            :             input_iterator_type m_End;
<span class="lineNum">     174 </span>            :         };
<span class="lineNum">     175 </span>            : 
<span class="lineNum">     176 </span>            :         //! find iterator construction helper
<span class="lineNum">     177 </span>            :         /*!
<span class="lineNum">     178 </span>            :          *    Construct a find iterator to iterate through the specified string
<span class="lineNum">     179 </span>            :          */
<span class="lineNum">     180 </span>            :         template&lt;typename RangeT, typename FinderT&gt;
<span class="lineNum">     181 </span>            :         inline find_iterator&lt; 
<span class="lineNum">     182 </span>            :             BOOST_STRING_TYPENAME range_iterator&lt;RangeT&gt;::type&gt;
<span class="lineNum">     183 </span>            :         make_find_iterator(
<span class="lineNum">     184 </span>            :             RangeT&amp; Collection,
<span class="lineNum">     185 </span>            :             FinderT Finder)
<span class="lineNum">     186 </span>            :         {
<span class="lineNum">     187 </span>            :             return find_iterator&lt;BOOST_STRING_TYPENAME range_iterator&lt;RangeT&gt;::type&gt;(
<span class="lineNum">     188 </span>            :                 Collection, Finder);
<span class="lineNum">     189 </span>            :         }
<span class="lineNum">     190 </span>            : 
<span class="lineNum">     191 </span>            : //  split iterator -----------------------------------------------//
<span class="lineNum">     192 </span>            : 
<span class="lineNum">     193 </span>            :         //! split_iterator
<span class="lineNum">     194 </span>            :         /*!    
<span class="lineNum">     195 </span>            :             Split iterator encapsulates a Finder and allows
<span class="lineNum">     196 </span>            :             for incremental searching in a string.
<span class="lineNum">     197 </span>            :             Unlike the find iterator, split iterator iterates
<span class="lineNum">     198 </span>            :             through gaps between matches.
<span class="lineNum">     199 </span>            : 
<span class="lineNum">     200 </span>            :             Find iterator is a readable forward traversal iterator.
<span class="lineNum">     201 </span>            : 
<span class="lineNum">     202 </span>            :             Dereferencing the iterator yields an iterator_range delimiting
<span class="lineNum">     203 </span>            :             the current match.
<span class="lineNum">     204 </span>            :         */
<span class="lineNum">     205 </span>            :         template&lt;typename IteratorT&gt;
<span class="lineNum">     206 </span><span class="lineCov">         10 :         class split_iterator : </span>
<span class="lineNum">     207 </span>            :             public iterator_facade&lt;
<span class="lineNum">     208 </span>            :                 split_iterator&lt;IteratorT&gt;,
<span class="lineNum">     209 </span>            :                 const iterator_range&lt;IteratorT&gt;,
<span class="lineNum">     210 </span>            :                 forward_traversal_tag &gt;,
<span class="lineNum">     211 </span>            :             private detail::find_iterator_base&lt;IteratorT&gt;
<span class="lineNum">     212 </span>            :         {
<span class="lineNum">     213 </span>            :         private:
<span class="lineNum">     214 </span>            :             // facade support
<span class="lineNum">     215 </span>            :             friend class ::boost::iterator_core_access;
<span class="lineNum">     216 </span>            : 
<span class="lineNum">     217 </span>            :         private:
<span class="lineNum">     218 </span>            :         // typedefs
<span class="lineNum">     219 </span>            : 
<span class="lineNum">     220 </span>            :             typedef detail::find_iterator_base&lt;IteratorT&gt; base_type;
<span class="lineNum">     221 </span>            :             typedef BOOST_STRING_TYPENAME 
<span class="lineNum">     222 </span>            :                 base_type::input_iterator_type input_iterator_type;
<span class="lineNum">     223 </span>            :             typedef BOOST_STRING_TYPENAME 
<span class="lineNum">     224 </span>            :                 base_type::match_type match_type;
<span class="lineNum">     225 </span>            : 
<span class="lineNum">     226 </span>            :         public:
<span class="lineNum">     227 </span>            :             //! Default constructor
<span class="lineNum">     228 </span>            :             /*!
<span class="lineNum">     229 </span>            :                 Construct null iterator. All null iterators are equal.
<span class="lineNum">     230 </span>            :     
<span class="lineNum">     231 </span>            :                 \post eof()==true
<span class="lineNum">     232 </span>            :             */
<span class="lineNum">     233 </span>            :             split_iterator() :
<span class="lineNum">     234 </span>            :                 m_Next(),
<span class="lineNum">     235 </span>            :                 m_End(),
<span class="lineNum">     236 </span><span class="lineCov">          1 :                 m_bEof(true)</span>
<span class="lineNum">     237 </span>            :             {}
<span class="lineNum">     238 </span>            : 
<span class="lineNum">     239 </span>            :             //! Copy constructor
<span class="lineNum">     240 </span>            :             /*!
<span class="lineNum">     241 </span>            :                 Construct a copy of the split_iterator
<span class="lineNum">     242 </span>            :             */
<span class="lineNum">     243 </span>            :             split_iterator( const split_iterator&amp; Other ) :
<span class="lineNum">     244 </span>            :                 base_type(Other),
<span class="lineNum">     245 </span>            :                 m_Match(Other.m_Match),
<span class="lineNum">     246 </span>            :                 m_Next(Other.m_Next),
<span class="lineNum">     247 </span>            :                 m_End(Other.m_End),
<span class="lineNum">     248 </span><span class="lineCov">          8 :                 m_bEof(Other.m_bEof)</span>
<span class="lineNum">     249 </span>            :             {}
<span class="lineNum">     250 </span>            : 
<span class="lineNum">     251 </span>            :             //! Constructor
<span class="lineNum">     252 </span>            :             /*!
<span class="lineNum">     253 </span>            :                 Construct new split_iterator for a given finder
<span class="lineNum">     254 </span>            :                 and a range.
<a name="255"><span class="lineNum">     255 </span>            :             */</a>
<span class="lineNum">     256 </span>            :             template&lt;typename FinderT&gt;
<span class="lineNum">     257 </span><span class="lineCov">          1 :             split_iterator(</span>
<span class="lineNum">     258 </span>            :                     IteratorT Begin,
<span class="lineNum">     259 </span>            :                     IteratorT End,
<span class="lineNum">     260 </span>            :                     FinderT Finder ) :
<span class="lineNum">     261 </span>            :                 detail::find_iterator_base&lt;IteratorT&gt;(Finder,0),
<span class="lineNum">     262 </span>            :                 m_Match(Begin,Begin),
<span class="lineNum">     263 </span>            :                 m_Next(Begin),
<span class="lineNum">     264 </span>            :                 m_End(End),
<span class="lineNum">     265 </span><span class="lineCov">          3 :                 m_bEof(false)</span>
<span class="lineNum">     266 </span>            :             {
<span class="lineNum">     267 </span>            :                 // force the correct behavior for empty sequences and yield at least one token
<span class="lineNum">     268 </span><span class="lineCov">          1 :                 if(Begin!=End)</span>
<span class="lineNum">     269 </span>            :                 {
<span class="lineNum">     270 </span><span class="lineNoCov">          0 :                     increment();</span>
<span class="lineNum">     271 </span>            :                 }
<span class="lineNum">     272 </span><span class="lineCov">          1 :             }</span>
<span class="lineNum">     273 </span>            :             //! Constructor
<span class="lineNum">     274 </span>            :             /*!
<span class="lineNum">     275 </span>            :                 Construct new split_iterator for a given finder
<span class="lineNum">     276 </span>            :                 and a collection.
<span class="lineNum">     277 </span>            :             */
<span class="lineNum">     278 </span>            :             template&lt;typename FinderT, typename RangeT&gt;
<span class="lineNum">     279 </span>            :             split_iterator(
<span class="lineNum">     280 </span>            :                     RangeT&amp; Col,
<span class="lineNum">     281 </span>            :                     FinderT Finder ) :
<span class="lineNum">     282 </span>            :                 detail::find_iterator_base&lt;IteratorT&gt;(Finder,0),
<span class="lineNum">     283 </span>            :                 m_bEof(false)
<span class="lineNum">     284 </span>            :             {
<span class="lineNum">     285 </span>            :                 iterator_range&lt;BOOST_STRING_TYPENAME range_iterator&lt;RangeT&gt;::type&gt; lit_col(::boost::as_literal(Col));
<span class="lineNum">     286 </span>            :                 m_Match=make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col));
<span class="lineNum">     287 </span>            :                 m_Next=::boost::begin(lit_col);
<span class="lineNum">     288 </span>            :                 m_End=::boost::end(lit_col);
<span class="lineNum">     289 </span>            : 
<span class="lineNum">     290 </span>            :                 // force the correct behavior for empty sequences and yield at least one token
<span class="lineNum">     291 </span>            :                 if(m_Next!=m_End)
<span class="lineNum">     292 </span>            :                 {
<span class="lineNum">     293 </span>            :                     increment();
<span class="lineNum">     294 </span>            :                 }
<span class="lineNum">     295 </span>            :             }
<span class="lineNum">     296 </span>            : 
<span class="lineNum">     297 </span>            : 
<span class="lineNum">     298 </span>            :         private:
<span class="lineNum">     299 </span>            :         // iterator operations
<span class="lineNum">     300 </span>            : 
<span class="lineNum">     301 </span>            :             // dereference
<span class="lineNum">     302 </span>            :             const match_type&amp; dereference() const
<span class="lineNum">     303 </span>            :             {
<span class="lineNum">     304 </span>            :                 return m_Match;
<span class="lineNum">     305 </span>            :             }
<a name="306"><span class="lineNum">     306 </span>            : </a>
<span class="lineNum">     307 </span>            :             // increment
<span class="lineNum">     308 </span><span class="lineCov">          1 :             void increment()</span>
<span class="lineNum">     309 </span>            :             {
<span class="lineNum">     310 </span>            :                 match_type FindMatch=this-&gt;do_find( m_Next, m_End );
<span class="lineNum">     311 </span>            : 
<span class="lineNum">     312 </span><span class="lineCov">          1 :                 if(FindMatch.begin()==m_End &amp;&amp; FindMatch.end()==m_End)</span>
<span class="lineNum">     313 </span>            :                 {
<span class="lineNum">     314 </span><span class="lineCov">          1 :                     if(m_Match.end()==m_End)</span>
<span class="lineNum">     315 </span>            :                     {
<span class="lineNum">     316 </span>            :                         // Mark iterator as eof
<span class="lineNum">     317 </span><span class="lineCov">          1 :                         m_bEof=true;</span>
<span class="lineNum">     318 </span>            :                     }
<span class="lineNum">     319 </span>            :                 }
<span class="lineNum">     320 </span>            : 
<span class="lineNum">     321 </span><span class="lineCov">          1 :                 m_Match=match_type( m_Next, FindMatch.begin() );</span>
<span class="lineNum">     322 </span><span class="lineCov">          1 :                 m_Next=FindMatch.end();</span>
<span class="lineNum">     323 </span><span class="lineCov">          1 :             }</span>
<a name="324"><span class="lineNum">     324 </span>            : </a>
<span class="lineNum">     325 </span>            :             // comparison
<span class="lineNum">     326 </span><span class="lineCov">          2 :             bool equal( const split_iterator&amp; Other ) const</span>
<span class="lineNum">     327 </span>            :             {
<span class="lineNum">     328 </span>            :                 bool bEof=eof();
<span class="lineNum">     329 </span>            :                 bool bOtherEof=Other.eof();
<span class="lineNum">     330 </span>            : 
<span class="lineNum">     331 </span>            :                 return bEof || bOtherEof ? bEof==bOtherEof :
<span class="lineNum">     332 </span>            :                     (
<span class="lineNum">     333 </span><span class="lineNoCov">          0 :                         m_Match==Other.m_Match &amp;&amp;</span>
<span class="lineNum">     334 </span>            :                         m_Next==Other.m_Next &amp;&amp;
<span class="lineNum">     335 </span>            :                         m_End==Other.m_End
<span class="lineNum">     336 </span><span class="lineCov">          2 :                     );</span>
<span class="lineNum">     337 </span>            :             }
<span class="lineNum">     338 </span>            : 
<span class="lineNum">     339 </span>            :         public:
<span class="lineNum">     340 </span>            :         // operations
<span class="lineNum">     341 </span>            : 
<span class="lineNum">     342 </span>            :             //! Eof check
<span class="lineNum">     343 </span>            :             /*!
<span class="lineNum">     344 </span>            :                 Check the eof condition. Eof condition means that
<span class="lineNum">     345 </span>            :                 there is nothing more to be searched i.e. find_iterator
<span class="lineNum">     346 </span>            :                 is after the last match.
<span class="lineNum">     347 </span>            :             */
<span class="lineNum">     348 </span>            :             bool eof() const
<span class="lineNum">     349 </span>            :             {
<span class="lineNum">     350 </span><span class="lineCov">          2 :                 return this-&gt;is_null() || m_bEof;</span>
<span class="lineNum">     351 </span>            :             }
<span class="lineNum">     352 </span>            : 
<span class="lineNum">     353 </span>            :         private:
<span class="lineNum">     354 </span>            :         // Attributes
<span class="lineNum">     355 </span>            :             match_type m_Match;
<span class="lineNum">     356 </span>            :             input_iterator_type m_Next;
<span class="lineNum">     357 </span>            :             input_iterator_type m_End;
<span class="lineNum">     358 </span>            :             bool m_bEof;
<span class="lineNum">     359 </span>            :         };
<span class="lineNum">     360 </span>            : 
<span class="lineNum">     361 </span>            :         //! split iterator construction helper
<span class="lineNum">     362 </span>            :         /*!
<span class="lineNum">     363 </span>            :          *    Construct a split iterator to iterate through the specified collection
<span class="lineNum">     364 </span>            :          */
<span class="lineNum">     365 </span>            :         template&lt;typename RangeT, typename FinderT&gt;
<span class="lineNum">     366 </span>            :         inline split_iterator&lt; 
<span class="lineNum">     367 </span>            :             BOOST_STRING_TYPENAME range_iterator&lt;RangeT&gt;::type&gt;
<span class="lineNum">     368 </span>            :         make_split_iterator(
<span class="lineNum">     369 </span>            :             RangeT&amp; Collection,
<span class="lineNum">     370 </span>            :             FinderT Finder)
<span class="lineNum">     371 </span>            :         {
<span class="lineNum">     372 </span>            :             return split_iterator&lt;BOOST_STRING_TYPENAME range_iterator&lt;RangeT&gt;::type&gt;(
<span class="lineNum">     373 </span>            :                 Collection, Finder);
<span class="lineNum">     374 </span>            :         }
<span class="lineNum">     375 </span>            : 
<span class="lineNum">     376 </span>            : 
<span class="lineNum">     377 </span>            :     } // namespace algorithm
<span class="lineNum">     378 </span>            : 
<span class="lineNum">     379 </span>            :     // pull names to the boost namespace
<span class="lineNum">     380 </span>            :     using algorithm::find_iterator;
<span class="lineNum">     381 </span>            :     using algorithm::make_find_iterator;
<span class="lineNum">     382 </span>            :     using algorithm::split_iterator;
<span class="lineNum">     383 </span>            :     using algorithm::make_split_iterator;
<span class="lineNum">     384 </span>            : 
<span class="lineNum">     385 </span>            : } // namespace boost
<span class="lineNum">     386 </span>            : 
<span class="lineNum">     387 </span>            : 
<span class="lineNum">     388 </span>            : #endif  // BOOST_STRING_FIND_ITERATOR_HPP
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
